Notebook Cells

  • An IPython Notebook is a series of "cells".
  • The active cell has an outline around it.
  • Navigate to different cells with the arrow keys.
  • A cell can either be code (Python), markdown, or "raw".
  • Create cells from the IPython Notebook menu or better yet learn the keyboard shortcuts.
    • h: Bring up keyboard shortcuts screen.

Modes

The IPython Notebook has two different keyboard input modes. Edit mode allows you to type code/text into a cell and is indicated by a green cell border. Command mode binds the keyboard to notebook level actions and is indicated by a grey cell border.

  • Enter: Enter edit mode.
  • Esc or ctrl-m: Enter command mode.

Helpful Shortcuts

  • Ctrl-Enter: Run Cell
  • Shift-Enter: Run cell, select cell below.
  • Alt-Enter: Run Cell, insert below.
  • Ctrl-s: Save Notebook
  • i: Interrupt kernel (press twice).
  • 0: Restart kernel (press twice).

Other Shortcuts

There are also shortcuts for:

  • Bring up tooltips.
  • Split, Merge, Delete cells.
  • Toggle Output, output Scrolling.
  • And More!!! (See h).